-- painful_halo
-- created by dengc
-- 痛苦光环（阿斯塔纳暗投影使用，用于技能的描述）

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;

        local pos = DungeonBossM.getBossPos();
        local target = DungeonM.getGridByPos(pos).monster;

        local value = prop[3];

        -- 当前回合
        local round = target.dbase:query("valid_round") or CombatM.getRound();

        -- 开始处于黑暗形态的回合
        local startDarkRound = target.dbase:query("start_dark_round") or 0;

        -- 回合差
        local difRound = round - startDarkRound;

        -- 最大生命值
        local maxHp = ME.user:getMaxHp();

        -- 最终伤害
        local damage = FormulaM.invoke("CALA_ROUND_BLEED_VALUE", difRound, maxHp, value);
        desc = string.gsub(desc, "{prop}", damage);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};